package com.work.service.impl;

import com.work.bean.Teacher;
import com.work.dao.TeacherDao;
import com.work.dao.impl.TeacherDaoImpl;
import com.work.service.TeacherService;

import java.util.List;

public class TeacherServiceImpl implements TeacherService {
    TeacherDao teacherDao = new TeacherDaoImpl();
    public Teacher queryTeacherById(Integer id) {
        return teacherDao.queryTeacherById(id);
    }

    public List<Teacher> queryTeacher() {
        return teacherDao.queryTeacher();
    }

    public int saveTeacher(Teacher teacher) {
        return teacherDao.saveTeacher(teacher);
    }

    public int updateTeacher(Teacher teacher) {
        return teacherDao.updateTeacher(teacher);
    }

    public int updateTeacherPwdById(Teacher teacher) {
        return teacherDao.updateTeacherPwdById(teacher);
    }

    public int deleteTeacher(Integer id) {
        return teacherDao.deleteTeacher(id);
    }
}
